package org.analyzer.custom;

import java.io.Reader;

import org.apache.lucene.analysis.util.CharTokenizer;
import org.apache.lucene.util.AttributeFactory;
import org.apache.lucene.util.Version;

public class CustomTokenizer extends CharTokenizer {
	
	private String split= "|()/";  
	
	  public CustomTokenizer(Version matchVersion, Reader in) {
	    super(matchVersion, in);
	  }

	  public CustomTokenizer(Version matchVersion, AttributeFactory factory, Reader in) {
	    super(matchVersion, factory, in);
	  }
	  
	  @Override
	  protected boolean isTokenChar(int c) {

		  char cr = (char)c;
		  for(int i=0;i<split.length();i++){
			  if(split.charAt(i)==cr){
				  return false;
			  }
		  }
		  return true;
	  }
}
